// author:jxx
// 此处是对表单的方法，组件，权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
let extension = {
  components: {// 动态扩充组件或组件路径
    // 表单header、content、footer对应位置扩充的组件
    gridHeader: '', // { template: "<div>扩展组xx件</div>" },
    gridBody: '',
    gridFooter: '',
    // 弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  buttons: {
    view: [/* {
      name: '导出明细',
      icon: 'md-create',
      value: 'Edit',
      index: 1,
      type: 'success',
      onClick: function () { this.exportdetail() }
    } */],
    box: [],
    detail: []
  }, // 扩展的按钮
  methods: {// 事件扩展
    onInit () {
    },
    exportdetail () {
      let query = this.getSearchParameters()
      let param = { wheres: [] }
      if (query) {
        param.wheres = JSON.stringify(query.wheres)
      }
      this.http.post('api/v_questionnaireresult/exportDetails', param).then(x => {
        console.log(x)
        if (x.status) {
        }
      })
      /* this.http.post('api/news/createPage', this.currentRow).then(x => {
        if (x.status) {
          // this.editFormFileds.DetailUrl = x.data.url;
          this.currentRow.DetailUrl = x.data.url
        }
        this.refresh()
        return this.$Message.info(x.message)
      }) */
    }
  }
}
export default extension
